package nu.zoom.catonine.swing.tail;

import java.awt.event.ActionEvent;

import nu.zoom.swing.action.AbstractTypedAction;
import nu.zoom.ui.Resources;
import nu.zoom.ui.Resources.ResourceNotFoundException;

public class CreateSimpleRuleAction extends AbstractTypedAction {
	private static final long serialVersionUID = -243350619726281805L;
	private final TailPane pane;

	public CreateSimpleRuleAction(final Resources resources, final TailPane pane)
			throws ResourceNotFoundException {
		super();
		this.pane = pane;
		setName(resources.getMessage("nu.zoom.catonine.tail.createsimplerule"));
		setToolTip(resources
				.getMessage("nu.zoom.catonine.tail.createsimplerule.tt"));
		setIcon(resources
				.getIcon("nu.zoom.catonine.tail.createsimplerule.icon"));
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		this.pane.createSimpleRule() ;
	}

}
